package edu.gatech.foodaway;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

public class DonorHomeActivity extends Activity {
	TextView txt_rname;
	ImageView img_rpicture;
	ListView list_postingorder;
	Button btn_neworder;
	Button btn_delete;
	Button btn_accept;
	public static final String[] mockFoodAlreadyPostedList = {"Hotdogs","Buns","Corns"};
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_donorhome);
		txt_rname = (TextView)findViewById(R.id.textView_donorhome_restaurantname);
		img_rpicture = (ImageView)findViewById(R.id.imageView_donorhome_restaurantpic);
		list_postingorder = (ListView)findViewById(R.id.listView_foodpost_postingitems);
		btn_neworder = (Button)findViewById(R.id.btn_neworder);
		btn_delete = (Button)findViewById(R.id.btn_delete);
		btn_accept = (Button)findViewById(R.id.btn_accept);
		
		list_postingorder.setItemsCanFocus(false);
		list_postingorder.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
		list_postingorder.setAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_multiple_choice, mockFoodAlreadyPostedList));
		btn_neworder.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				Intent i = new Intent(DonorHomeActivity.this, FoodPostActivity.class);
				startActivity(i);
			}
	});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.donorhome, menu);
		return true;
	}

}
